package kr.co.hanbit;
import java.util.StringTokenizer;

public class StringTokenEx1 {

	StringTokenizer st;
	public StringTokenEx1 (String str) {
		System.out.println(str);
		st = new StringTokenizer(str);
		}
	
	public StringTokenEx1 (String str, String delim) {
		System.out.println(str);
		st = new StringTokenizer(str, delim);
	}
	
	public void print(){
		System.out.println(st.countTokens());
	while(st.hasMoreTokens()){
		String token = st.nextToken();
		System.out.println(token);
	}
	System.out.println("qw;e");
	}
	public static void main(String[] args) {
		StringTokenEx1 st1 = new StringTokenEx1("....");
		st1.print();
		
		StringTokenEx1 st2 = new StringTokenEx1("qq!qqq!q", "!");
		
		st2.print();
		
	}
	
}
